package com.mmy.controller;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
import lombok.extern.slf4j.Slf4j;


/**
 * @vesion 
 * @description 测试AOP
 * @author liys
 * @date 2021-7-26
 */

@Aspect 
//@Component
@Slf4j
public class LogAdvice {
	
    //@Pointcut("@annotation(org.springframework.web.bind.annotation.GetMapping)")
	@Pointcut("execution(* com.mmy.controller..*.*(..))")
    private void logAdvicePointcut() {}

    @Before("logAdvicePointcut()")
    public void logAdvice(){
    	log.info("Before PointCut");
    }
}
